package org.zlb.manager.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.zlb.manager.dao.FunAvatarDao;
import org.zlb.manager.entity.FunAvatar;
import org.zlb.manager.entity.OrgOperator;

import java.util.List;

/**
 * TODO
 *
 * @author zhoulingbo
 * @date 2021/8/17 17:55
 */
@Component
public class FunAvatarService {

    @Autowired
    private FunAvatarDao avatarDao;

    public List<FunAvatar> list() {
        return avatarDao.findAll();
    }

    public FunAvatar item(Long avatarId) {
        return avatarDao.getById(avatarId);
    }

    public FunAvatar save(FunAvatar avatar) {
        return avatarDao.save(avatar);
    }

    public void delete(Long avatarId) {
        avatarDao.deleteById(avatarId);
    }

    public long count() {
        return avatarDao.count();
    }
}
